<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

class SourceData
{

    public $data = array();
    public $printData = array();
    public $testNumber;
    public $groupNumber;

    function __construct($groupNumber,$testNumber)
    {

        for ($i = 0; $i < $groupNumber; $i++)
        {
//                $this->printData[$i] = ""; 
            for ($j = 0; $j < $testNumber; $j++)
            {
                $this->printData[$i] .= ($this->data[$i][$j] = rand(0, 10000))."\t";
                if (0 == ($j+1) % 6)
                {
                    $this->printData[$i].= "\n";
                }
            }
        }
        $this->groupNumber = $groupNumber;
        $this->testNumber = $testNumber;
       
    }

    function __set($name, $value)
    {
        $this->$name = $value;
    }

    function __get($name)
    {
        return $this->$name;
    }

    function format()
    {
        for ($index = 0; $index < $this->groupNumber; $index++)
        {

        }
    }
}

$sourceData = new SourceData(5,100);
?>
